# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jan Hambrecht <jaham at gmx dot net>

pkgname=libspnav
pkgver=0.2.3
pkgrel=3
pkgdesc="Alternative to the proprietary 3Dconnexion device driver and SDK for their 3D input devices"
arch=(x86_64)
url='https://spacenav.sourceforge.net/'
license=(GPL)
depends=(libx11)
source=("https://downloads.sourceforge.net/spacenav/$pkgname-$pkgver.tar.gz"
        Makefile.patch)
sha256sums=('7ae4d7bb7f6a5dda28b487891e01accc856311440f582299760dace6ee5f1f93'
            'a49a9ac824ad41c043018094dd118ba92dd29f96fee92e70b640e47f643dde44')

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i ../Makefile.patch
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --disable-debug
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
